Integrand size = 35, antiderivative size = 429 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c g+d g x)^4} \, dx=\frac {2 B^2 d^2 n^2 (a+b x)^3}{27 (b c-a d)^3 g^4 (c+d x)^3}-\frac {b B^2 d n^2 (a+b x)^2}{2 (b c-a d)^3 g^4 (c+d x)^2}+\frac {2 b^2 B^2 n^2 (a+b x)}{(b c-a d)^3 g^4 (c+d x)}-\frac {2 B d^2 n (a+b x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{9 (b c-a d)^3 g^4 (c+d x)^3}+\frac {b B d n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^3 g^4 (c+d x)^2}-\frac {2 b^2 B n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(b c-a d)^3 g^4 (c+d x)}-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{3 d g^4 (c+d x)^3}+\frac {2 b^3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {a+b x}{c+d x}\right )}{3 d (b c-a d)^3 g^4}-\frac {b^3 B^2 n^2 \log ^2\left (\frac {a+b x}{c+d x}\right )}{3 d (b c-a d)^3 g^4} \]
2/27*B^2*d^2*n^2*(b*x+a)^3/(-a*d+b*c)^3/g^4/(d*x+c)^3-1/2*b*B^2*d*n^2*(b*x +a)^2/(-a*d+b*c)^3/g^4/(d*x+c)^2+2*b^2*B^2*n^2*(b*x+a)/(-a*d+b*c)^3/g^4/(d *x+c)-2/9*B*d^2*n*(b*x+a)^3*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/(-a*d+b*c)^3/g ^4/(d*x+c)^3+b*B*d*n*(b*x+a)^2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/(-a*d+b*c)^ 3/g^4/(d*x+c)^2-2*b^2*B*n*(b*x+a)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/(-a*d+b* c)^3/g^4/(d*x+c)-1/3*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/d/g^4/(d*x+c)^3+2/3 *b^3*B*n*(A+B*ln(e*((b*x+a)/(d*x+c))^n))*ln((b*x+a)/(d*x+c))/d/(-a*d+b*c)^ 3/g^4-1/3*b^3*B^2*n^2*ln((b*x+a)/(d*x+c))^2/d/(-a*d+b*c)^3/g^4
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 0.38 (sec) , antiderivative size = 612, normalized size of antiderivative = 1.43 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c g+d g x)^4} \, dx=\frac {-18 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+\frac {B n \left (12 A (b c-a d)^3-4 B (b c-a d)^3 n+18 A b (b c-a d)^2 (c+d x)-15 b B (b c-a d)^2 n (c+d x)+36 A b^2 (b c-a d) (c+d x)^2-66 b^2 B (b c-a d) n (c+d x)^2+36 A b^3 (c+d x)^3 \log (a+b x)-66 b^3 B n (c+d x)^3 \log (a+b x)-18 b^3 B n (c+d x)^3 \log ^2(a+b x)+12 B (b c-a d)^3 \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+18 b B (b c-a d)^2 (c+d x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+36 b^2 B (b c-a d) (c+d x)^2 \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+36 b^3 B (c+d x)^3 \log (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-36 A b^3 (c+d x)^3 \log (c+d x)+66 b^3 B n (c+d x)^3 \log (c+d x)+36 b^3 B n (c+d x)^3 \log \left (\frac {d (a+b x)}{-b c+a d}\right ) \log (c+d x)-36 b^3 B (c+d x)^3 \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \log (c+d x)-18 b^3 B n (c+d x)^3 \log ^2(c+d x)+36 b^3 B n (c+d x)^3 \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )+36 b^3 B n (c+d x)^3 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )+36 b^3 B n (c+d x)^3 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )}{(b c-a d)^3}}{54 d g^4 (c+d x)^3} \]
(-18*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2 + (B*n*(12*A*(b*c - a*d)^3 - 4*B*(b*c - a*d)^3*n + 18*A*b*(b*c - a*d)^2*(c + d*x) - 15*b*B*(b*c - a*d) ^2*n*(c + d*x) + 36*A*b^2*(b*c - a*d)*(c + d*x)^2 - 66*b^2*B*(b*c - a*d)*n *(c + d*x)^2 + 36*A*b^3*(c + d*x)^3*Log[a + b*x] - 66*b^3*B*n*(c + d*x)^3* Log[a + b*x] - 18*b^3*B*n*(c + d*x)^3*Log[a + b*x]^2 + 12*B*(b*c - a*d)^3* Log[e*((a + b*x)/(c + d*x))^n] + 18*b*B*(b*c - a*d)^2*(c + d*x)*Log[e*((a + b*x)/(c + d*x))^n] + 36*b^2*B*(b*c - a*d)*(c + d*x)^2*Log[e*((a + b*x)/( c + d*x))^n] + 36*b^3*B*(c + d*x)^3*Log[a + b*x]*Log[e*((a + b*x)/(c + d*x ))^n] - 36*A*b^3*(c + d*x)^3*Log[c + d*x] + 66*b^3*B*n*(c + d*x)^3*Log[c + d*x] + 36*b^3*B*n*(c + d*x)^3*Log[(d*(a + b*x))/(-(b*c) + a*d)]*Log[c + d *x] - 36*b^3*B*(c + d*x)^3*Log[e*((a + b*x)/(c + d*x))^n]*Log[c + d*x] - 1 8*b^3*B*n*(c + d*x)^3*Log[c + d*x]^2 + 36*b^3*B*n*(c + d*x)^3*Log[a + b*x] *Log[(b*(c + d*x))/(b*c - a*d)] + 36*b^3*B*n*(c + d*x)^3*PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)] + 36*b^3*B*n*(c + d*x)^3*PolyLog[2, (b*(c + d*x))/ (b*c - a*d)]))/(b*c - a*d)^3)/(54*d*g^4*(c + d*x)^3)
Time = 0.46 (sec) , antiderivative size = 331, normalized size of antiderivative = 0.77, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {2951, 2756, 2772, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{(c g+d g x)^4} \, dx\) |
\(\Big \downarrow \) 2951 |
\(\displaystyle \frac {\int \left (b-\frac {d (a+b x)}{c+d x}\right )^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2d\frac {a+b x}{c+d x}}{g^4 (b c-a d)^3}\) |
\(\Big \downarrow \) 2756 |
\(\displaystyle \frac {\frac {2 B n \int \frac {(c+d x) \left (b-\frac {d (a+b x)}{c+d x}\right )^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a+b x}d\frac {a+b x}{c+d x}}{3 d}-\frac {\left (b-\frac {d (a+b x)}{c+d x}\right )^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{3 d}}{g^4 (b c-a d)^3}\) |
\(\Big \downarrow \) 2772 |
\(\displaystyle \frac {\frac {2 B n \left (-B n \int \left (\frac {b^3 (c+d x) \log \left (\frac {a+b x}{c+d x}\right )}{a+b x}-\frac {1}{6} d \left (18 b^2-\frac {9 d (a+b x) b}{c+d x}+\frac {2 d^2 (a+b x)^2}{(c+d x)^2}\right )\right )d\frac {a+b x}{c+d x}+b^3 \log \left (\frac {a+b x}{c+d x}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )-\frac {3 b^2 d (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{c+d x}-\frac {d^3 (a+b x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 (c+d x)^3}+\frac {3 b d^2 (a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (c+d x)^2}\right )}{3 d}-\frac {\left (b-\frac {d (a+b x)}{c+d x}\right )^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{3 d}}{g^4 (b c-a d)^3}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {2 B n \left (b^3 \log \left (\frac {a+b x}{c+d x}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )-\frac {3 b^2 d (a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{c+d x}-\frac {d^3 (a+b x)^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{3 (c+d x)^3}+\frac {3 b d^2 (a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{2 (c+d x)^2}-B n \left (\frac {1}{2} b^3 \log ^2\left (\frac {a+b x}{c+d x}\right )-\frac {3 b^2 d (a+b x)}{c+d x}-\frac {d^3 (a+b x)^3}{9 (c+d x)^3}+\frac {3 b d^2 (a+b x)^2}{4 (c+d x)^2}\right )\right )}{3 d}-\frac {\left (b-\frac {d (a+b x)}{c+d x}\right )^3 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{3 d}}{g^4 (b c-a d)^3}\) |
(-1/3*((b - (d*(a + b*x))/(c + d*x))^3*(A + B*Log[e*((a + b*x)/(c + d*x))^ n])^2)/d + (2*B*n*(-1/3*(d^3*(a + b*x)^3*(A + B*Log[e*((a + b*x)/(c + d*x) )^n]))/(c + d*x)^3 + (3*b*d^2*(a + b*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x ))^n]))/(2*(c + d*x)^2) - (3*b^2*d*(a + b*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(c + d*x) + b^3*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[(a + b*x)/(c + d*x)] - B*n*(-1/9*(d^3*(a + b*x)^3)/(c + d*x)^3 + (3*b*d^2*(a + b*x)^2)/(4*(c + d*x)^2) - (3*b^2*d*(a + b*x))/(c + d*x) + (b^3*Log[(a + b *x)/(c + d*x)]^2)/2)))/(3*d))/((b*c - a*d)^3*g^4)
3.1.45.3.1 Defintions of rubi rules used
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/(e*(q + 1))), x] - Simp[b*n*(p/(e*(q + 1))) Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (IntegersQ[2*p, 2*q] && !IGtQ[q, 0]) || (EqQ[p, 2] & & NeQ[q, 1]))
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_ .))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(d + e*x^r)^q, x]}, Simp[(a + b*Log[c*x^n]) u, x] - Simp[b*n Int[SimplifyIntegrand[u/x, x], x], x]] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] && !(EqQ[q , 1] && EqQ[m, -1])
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d)^(m + 1)*(g/d)^m Subst[Int[(A + B*Log[e*x^n])^p/(b - d*x)^(m + 2), x], x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && NeQ[b*c - a*d, 0] && IntegersQ[m, p] && EqQ[d*f - c*g, 0] && (GtQ[p, 0] || LtQ[m, - 1])
Leaf count of result is larger than twice the leaf count of optimal. \(1145\) vs. \(2(417)=834\).
Time = 16.05 (sec) , antiderivative size = 1146, normalized size of antiderivative = 2.67
-1/54*(54*B^2*x^2*ln(e*((b*x+a)/(d*x+c))^n)^2*b^4*c*d^6*n-36*B^2*x^2*ln(e* ((b*x+a)/(d*x+c))^n)*a*b^3*d^7*n^2-162*B^2*x^2*ln(e*((b*x+a)/(d*x+c))^n)*b ^4*c*d^6*n^2-36*A*B*x^2*a*b^3*d^7*n^2+36*A*B*x^2*b^4*c*d^6*n^2+54*B^2*x*ln (e*((b*x+a)/(d*x+c))^n)^2*b^4*c^2*d^5*n+36*A*B*x^3*ln(e*((b*x+a)/(d*x+c))^ n)*b^4*d^7*n+54*A*B*a^2*b^2*c*d^6*n^2-108*A*B*a*b^3*c^2*d^5*n^2+108*A*B*x^ 2*ln(e*((b*x+a)/(d*x+c))^n)*b^4*c*d^6*n-108*B^2*x*ln(e*((b*x+a)/(d*x+c))^n )*a*b^3*c*d^6*n^2+108*A*B*x*ln(e*((b*x+a)/(d*x+c))^n)*b^4*c^2*d^5*n-108*A* B*x*a*b^3*c*d^6*n^2-108*A*B*ln(e*((b*x+a)/(d*x+c))^n)*a^2*b^2*c*d^6*n+108* A*B*ln(e*((b*x+a)/(d*x+c))^n)*a*b^3*c^2*d^5*n+18*B^2*x*ln(e*((b*x+a)/(d*x+ c))^n)*a^2*b^2*d^7*n^2-108*B^2*x*ln(e*((b*x+a)/(d*x+c))^n)*b^4*c^2*d^5*n^2 +162*B^2*x*a*b^3*c*d^6*n^3+18*A*B*x*a^2*b^2*d^7*n^2+90*A*B*x*b^4*c^2*d^5*n ^2-54*B^2*ln(e*((b*x+a)/(d*x+c))^n)^2*a^2*b^2*c*d^6*n+54*B^2*ln(e*((b*x+a) /(d*x+c))^n)^2*a*b^3*c^2*d^5*n+54*B^2*ln(e*((b*x+a)/(d*x+c))^n)*a^2*b^2*c* d^6*n^2-108*B^2*ln(e*((b*x+a)/(d*x+c))^n)*a*b^3*c^2*d^5*n^2+36*A*B*ln(e*(( b*x+a)/(d*x+c))^n)*a^3*b*d^7*n-27*B^2*a^2*b^2*c*d^6*n^3+108*B^2*a*b^3*c^2* d^5*n^3-12*A*B*a^3*b*d^7*n^2+66*A*B*b^4*c^3*d^4*n^2-54*A^2*a^2*b^2*c*d^6*n +54*A^2*a*b^3*c^2*d^5*n+4*B^2*a^3*b*d^7*n^3-85*B^2*b^4*c^3*d^4*n^3+18*A^2* a^3*b*d^7*n-18*A^2*b^4*c^3*d^4*n+18*B^2*x^3*ln(e*((b*x+a)/(d*x+c))^n)^2*b^ 4*d^7*n-66*B^2*x^3*ln(e*((b*x+a)/(d*x+c))^n)*b^4*d^7*n^2+66*B^2*x^2*a*b^3* d^7*n^3-66*B^2*x^2*b^4*c*d^6*n^3-15*B^2*x*a^2*b^2*d^7*n^3-147*B^2*x*b^4...
Leaf count of result is larger than twice the leaf count of optimal. 1167 vs. \(2 (417) = 834\).
Time = 0.29 (sec) , antiderivative size = 1167, normalized size of antiderivative = 2.72 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c g+d g x)^4} \, dx=-\frac {18 \, A^{2} b^{3} c^{3} - 54 \, A^{2} a b^{2} c^{2} d + 54 \, A^{2} a^{2} b c d^{2} - 18 \, A^{2} a^{3} d^{3} + {\left (85 \, B^{2} b^{3} c^{3} - 108 \, B^{2} a b^{2} c^{2} d + 27 \, B^{2} a^{2} b c d^{2} - 4 \, B^{2} a^{3} d^{3}\right )} n^{2} + 6 \, {\left (11 \, {\left (B^{2} b^{3} c d^{2} - B^{2} a b^{2} d^{3}\right )} n^{2} - 6 \, {\left (A B b^{3} c d^{2} - A B a b^{2} d^{3}\right )} n\right )} x^{2} + 18 \, {\left (B^{2} b^{3} c^{3} - 3 \, B^{2} a b^{2} c^{2} d + 3 \, B^{2} a^{2} b c d^{2} - B^{2} a^{3} d^{3}\right )} \log \left (e\right )^{2} - 18 \, {\left (B^{2} b^{3} d^{3} n^{2} x^{3} + 3 \, B^{2} b^{3} c d^{2} n^{2} x^{2} + 3 \, B^{2} b^{3} c^{2} d n^{2} x + {\left (3 \, B^{2} a b^{2} c^{2} d - 3 \, B^{2} a^{2} b c d^{2} + B^{2} a^{3} d^{3}\right )} n^{2}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 6 \, {\left (11 \, A B b^{3} c^{3} - 18 \, A B a b^{2} c^{2} d + 9 \, A B a^{2} b c d^{2} - 2 \, A B a^{3} d^{3}\right )} n + 3 \, {\left ({\left (49 \, B^{2} b^{3} c^{2} d - 54 \, B^{2} a b^{2} c d^{2} + 5 \, B^{2} a^{2} b d^{3}\right )} n^{2} - 6 \, {\left (5 \, A B b^{3} c^{2} d - 6 \, A B a b^{2} c d^{2} + A B a^{2} b d^{3}\right )} n\right )} x + 6 \, {\left (6 \, A B b^{3} c^{3} - 18 \, A B a b^{2} c^{2} d + 18 \, A B a^{2} b c d^{2} - 6 \, A B a^{3} d^{3} - 6 \, {\left (B^{2} b^{3} c d^{2} - B^{2} a b^{2} d^{3}\right )} n x^{2} - 3 \, {\left (5 \, B^{2} b^{3} c^{2} d - 6 \, B^{2} a b^{2} c d^{2} + B^{2} a^{2} b d^{3}\right )} n x - {\left (11 \, B^{2} b^{3} c^{3} - 18 \, B^{2} a b^{2} c^{2} d + 9 \, B^{2} a^{2} b c d^{2} - 2 \, B^{2} a^{3} d^{3}\right )} n - 6 \, {\left (B^{2} b^{3} d^{3} n x^{3} + 3 \, B^{2} b^{3} c d^{2} n x^{2} + 3 \, B^{2} b^{3} c^{2} d n x + {\left (3 \, B^{2} a b^{2} c^{2} d - 3 \, B^{2} a^{2} b c d^{2} + B^{2} a^{3} d^{3}\right )} n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} \log \left (e\right ) + 6 \, {\left ({\left (11 \, B^{2} b^{3} d^{3} n^{2} - 6 \, A B b^{3} d^{3} n\right )} x^{3} + {\left (18 \, B^{2} a b^{2} c^{2} d - 9 \, B^{2} a^{2} b c d^{2} + 2 \, B^{2} a^{3} d^{3}\right )} n^{2} - 3 \, {\left (6 \, A B b^{3} c d^{2} n - {\left (9 \, B^{2} b^{3} c d^{2} + 2 \, B^{2} a b^{2} d^{3}\right )} n^{2}\right )} x^{2} - 6 \, {\left (3 \, A B a b^{2} c^{2} d - 3 \, A B a^{2} b c d^{2} + A B a^{3} d^{3}\right )} n - 3 \, {\left (6 \, A B b^{3} c^{2} d n - {\left (6 \, B^{2} b^{3} c^{2} d + 6 \, B^{2} a b^{2} c d^{2} - B^{2} a^{2} b d^{3}\right )} n^{2}\right )} x\right )} \log \left (\frac {b x + a}{d x + c}\right )}{54 \, {\left ({\left (b^{3} c^{3} d^{4} - 3 \, a b^{2} c^{2} d^{5} + 3 \, a^{2} b c d^{6} - a^{3} d^{7}\right )} g^{4} x^{3} + 3 \, {\left (b^{3} c^{4} d^{3} - 3 \, a b^{2} c^{3} d^{4} + 3 \, a^{2} b c^{2} d^{5} - a^{3} c d^{6}\right )} g^{4} x^{2} + 3 \, {\left (b^{3} c^{5} d^{2} - 3 \, a b^{2} c^{4} d^{3} + 3 \, a^{2} b c^{3} d^{4} - a^{3} c^{2} d^{5}\right )} g^{4} x + {\left (b^{3} c^{6} d - 3 \, a b^{2} c^{5} d^{2} + 3 \, a^{2} b c^{4} d^{3} - a^{3} c^{3} d^{4}\right )} g^{4}\right )}} \]
-1/54*(18*A^2*b^3*c^3 - 54*A^2*a*b^2*c^2*d + 54*A^2*a^2*b*c*d^2 - 18*A^2*a ^3*d^3 + (85*B^2*b^3*c^3 - 108*B^2*a*b^2*c^2*d + 27*B^2*a^2*b*c*d^2 - 4*B^ 2*a^3*d^3)*n^2 + 6*(11*(B^2*b^3*c*d^2 - B^2*a*b^2*d^3)*n^2 - 6*(A*B*b^3*c* d^2 - A*B*a*b^2*d^3)*n)*x^2 + 18*(B^2*b^3*c^3 - 3*B^2*a*b^2*c^2*d + 3*B^2* a^2*b*c*d^2 - B^2*a^3*d^3)*log(e)^2 - 18*(B^2*b^3*d^3*n^2*x^3 + 3*B^2*b^3* c*d^2*n^2*x^2 + 3*B^2*b^3*c^2*d*n^2*x + (3*B^2*a*b^2*c^2*d - 3*B^2*a^2*b*c *d^2 + B^2*a^3*d^3)*n^2)*log((b*x + a)/(d*x + c))^2 - 6*(11*A*B*b^3*c^3 - 18*A*B*a*b^2*c^2*d + 9*A*B*a^2*b*c*d^2 - 2*A*B*a^3*d^3)*n + 3*((49*B^2*b^3 *c^2*d - 54*B^2*a*b^2*c*d^2 + 5*B^2*a^2*b*d^3)*n^2 - 6*(5*A*B*b^3*c^2*d - 6*A*B*a*b^2*c*d^2 + A*B*a^2*b*d^3)*n)*x + 6*(6*A*B*b^3*c^3 - 18*A*B*a*b^2* c^2*d + 18*A*B*a^2*b*c*d^2 - 6*A*B*a^3*d^3 - 6*(B^2*b^3*c*d^2 - B^2*a*b^2* d^3)*n*x^2 - 3*(5*B^2*b^3*c^2*d - 6*B^2*a*b^2*c*d^2 + B^2*a^2*b*d^3)*n*x - (11*B^2*b^3*c^3 - 18*B^2*a*b^2*c^2*d + 9*B^2*a^2*b*c*d^2 - 2*B^2*a^3*d^3) *n - 6*(B^2*b^3*d^3*n*x^3 + 3*B^2*b^3*c*d^2*n*x^2 + 3*B^2*b^3*c^2*d*n*x + (3*B^2*a*b^2*c^2*d - 3*B^2*a^2*b*c*d^2 + B^2*a^3*d^3)*n)*log((b*x + a)/(d* x + c)))*log(e) + 6*((11*B^2*b^3*d^3*n^2 - 6*A*B*b^3*d^3*n)*x^3 + (18*B^2* a*b^2*c^2*d - 9*B^2*a^2*b*c*d^2 + 2*B^2*a^3*d^3)*n^2 - 3*(6*A*B*b^3*c*d^2* n - (9*B^2*b^3*c*d^2 + 2*B^2*a*b^2*d^3)*n^2)*x^2 - 6*(3*A*B*a*b^2*c^2*d - 3*A*B*a^2*b*c*d^2 + A*B*a^3*d^3)*n - 3*(6*A*B*b^3*c^2*d*n - (6*B^2*b^3*c^2 *d + 6*B^2*a*b^2*c*d^2 - B^2*a^2*b*d^3)*n^2)*x)*log((b*x + a)/(d*x + c)...
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c g+d g x)^4} \, dx=\frac {\int \frac {A^{2}}{c^{4} + 4 c^{3} d x + 6 c^{2} d^{2} x^{2} + 4 c d^{3} x^{3} + d^{4} x^{4}}\, dx + \int \frac {B^{2} \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}^{2}}{c^{4} + 4 c^{3} d x + 6 c^{2} d^{2} x^{2} + 4 c d^{3} x^{3} + d^{4} x^{4}}\, dx + \int \frac {2 A B \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}}{c^{4} + 4 c^{3} d x + 6 c^{2} d^{2} x^{2} + 4 c d^{3} x^{3} + d^{4} x^{4}}\, dx}{g^{4}} \]
(Integral(A**2/(c**4 + 4*c**3*d*x + 6*c**2*d**2*x**2 + 4*c*d**3*x**3 + d** 4*x**4), x) + Integral(B**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)**2/(c* *4 + 4*c**3*d*x + 6*c**2*d**2*x**2 + 4*c*d**3*x**3 + d**4*x**4), x) + Inte gral(2*A*B*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(c**4 + 4*c**3*d*x + 6* c**2*d**2*x**2 + 4*c*d**3*x**3 + d**4*x**4), x))/g**4
Leaf count of result is larger than twice the leaf count of optimal. 1435 vs. \(2 (417) = 834\).
Time = 0.28 (sec) , antiderivative size = 1435, normalized size of antiderivative = 3.34 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c g+d g x)^4} \, dx=\text {Too large to display} \]
1/9*A*B*n*((6*b^2*d^2*x^2 + 11*b^2*c^2 - 7*a*b*c*d + 2*a^2*d^2 + 3*(5*b^2* c*d - a*b*d^2)*x)/((b^2*c^2*d^4 - 2*a*b*c*d^5 + a^2*d^6)*g^4*x^3 + 3*(b^2* c^3*d^3 - 2*a*b*c^2*d^4 + a^2*c*d^5)*g^4*x^2 + 3*(b^2*c^4*d^2 - 2*a*b*c^3* d^3 + a^2*c^2*d^4)*g^4*x + (b^2*c^5*d - 2*a*b*c^4*d^2 + a^2*c^3*d^3)*g^4) + 6*b^3*log(b*x + a)/((b^3*c^3*d - 3*a*b^2*c^2*d^2 + 3*a^2*b*c*d^3 - a^3*d ^4)*g^4) - 6*b^3*log(d*x + c)/((b^3*c^3*d - 3*a*b^2*c^2*d^2 + 3*a^2*b*c*d^ 3 - a^3*d^4)*g^4)) + 1/54*(6*n*((6*b^2*d^2*x^2 + 11*b^2*c^2 - 7*a*b*c*d + 2*a^2*d^2 + 3*(5*b^2*c*d - a*b*d^2)*x)/((b^2*c^2*d^4 - 2*a*b*c*d^5 + a^2*d ^6)*g^4*x^3 + 3*(b^2*c^3*d^3 - 2*a*b*c^2*d^4 + a^2*c*d^5)*g^4*x^2 + 3*(b^2 *c^4*d^2 - 2*a*b*c^3*d^3 + a^2*c^2*d^4)*g^4*x + (b^2*c^5*d - 2*a*b*c^4*d^2 + a^2*c^3*d^3)*g^4) + 6*b^3*log(b*x + a)/((b^3*c^3*d - 3*a*b^2*c^2*d^2 + 3*a^2*b*c*d^3 - a^3*d^4)*g^4) - 6*b^3*log(d*x + c)/((b^3*c^3*d - 3*a*b^2*c ^2*d^2 + 3*a^2*b*c*d^3 - a^3*d^4)*g^4))*log(e*(b*x/(d*x + c) + a/(d*x + c) )^n) - (85*b^3*c^3 - 108*a*b^2*c^2*d + 27*a^2*b*c*d^2 - 4*a^3*d^3 + 66*(b^ 3*c*d^2 - a*b^2*d^3)*x^2 + 18*(b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + 3*b^3*c^2*d *x + b^3*c^3)*log(b*x + a)^2 + 18*(b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + 3*b^3*c ^2*d*x + b^3*c^3)*log(d*x + c)^2 + 3*(49*b^3*c^2*d - 54*a*b^2*c*d^2 + 5*a^ 2*b*d^3)*x + 66*(b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + 3*b^3*c^2*d*x + b^3*c^3)* log(b*x + a) - 6*(11*b^3*d^3*x^3 + 33*b^3*c*d^2*x^2 + 33*b^3*c^2*d*x + 11* b^3*c^3 + 6*(b^3*d^3*x^3 + 3*b^3*c*d^2*x^2 + 3*b^3*c^2*d*x + b^3*c^3)*l...
Time = 1.31 (sec) , antiderivative size = 776, normalized size of antiderivative = 1.81 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c g+d g x)^4} \, dx=\frac {1}{54} \, {\left (18 \, {\left (\frac {3 \, {\left (b x + a\right )} B^{2} b^{2} n^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}} - \frac {3 \, {\left (b x + a\right )}^{2} B^{2} b d n^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{2}} + \frac {{\left (b x + a\right )}^{3} B^{2} d^{2} n^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{3}}\right )} \log \left (\frac {b x + a}{d x + c}\right )^{2} - 6 \, {\left (\frac {2 \, {\left (B^{2} d^{2} n^{2} - 3 \, B^{2} d^{2} n \log \left (e\right ) - 3 \, A B d^{2} n\right )} {\left (b x + a\right )}^{3}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{3}} - \frac {9 \, {\left (B^{2} b d n^{2} - 2 \, B^{2} b d n \log \left (e\right ) - 2 \, A B b d n\right )} {\left (b x + a\right )}^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{2}} + \frac {18 \, {\left (B^{2} b^{2} n^{2} - B^{2} b^{2} n \log \left (e\right ) - A B b^{2} n\right )} {\left (b x + a\right )}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}}\right )} \log \left (\frac {b x + a}{d x + c}\right ) + \frac {2 \, {\left (2 \, B^{2} d^{2} n^{2} - 6 \, B^{2} d^{2} n \log \left (e\right ) + 9 \, B^{2} d^{2} \log \left (e\right )^{2} - 6 \, A B d^{2} n + 18 \, A B d^{2} \log \left (e\right ) + 9 \, A^{2} d^{2}\right )} {\left (b x + a\right )}^{3}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{3}} - \frac {27 \, {\left (B^{2} b d n^{2} - 2 \, B^{2} b d n \log \left (e\right ) + 2 \, B^{2} b d \log \left (e\right )^{2} - 2 \, A B b d n + 4 \, A B b d \log \left (e\right ) + 2 \, A^{2} b d\right )} {\left (b x + a\right )}^{2}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}^{2}} + \frac {54 \, {\left (2 \, B^{2} b^{2} n^{2} - 2 \, B^{2} b^{2} n \log \left (e\right ) + B^{2} b^{2} \log \left (e\right )^{2} - 2 \, A B b^{2} n + 2 \, A B b^{2} \log \left (e\right ) + A^{2} b^{2}\right )} {\left (b x + a\right )}}{{\left (b^{2} c^{2} g^{4} - 2 \, a b c d g^{4} + a^{2} d^{2} g^{4}\right )} {\left (d x + c\right )}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \]
1/54*(18*(3*(b*x + a)*B^2*b^2*n^2/((b^2*c^2*g^4 - 2*a*b*c*d*g^4 + a^2*d^2* g^4)*(d*x + c)) - 3*(b*x + a)^2*B^2*b*d*n^2/((b^2*c^2*g^4 - 2*a*b*c*d*g^4 + a^2*d^2*g^4)*(d*x + c)^2) + (b*x + a)^3*B^2*d^2*n^2/((b^2*c^2*g^4 - 2*a* b*c*d*g^4 + a^2*d^2*g^4)*(d*x + c)^3))*log((b*x + a)/(d*x + c))^2 - 6*(2*( B^2*d^2*n^2 - 3*B^2*d^2*n*log(e) - 3*A*B*d^2*n)*(b*x + a)^3/((b^2*c^2*g^4 - 2*a*b*c*d*g^4 + a^2*d^2*g^4)*(d*x + c)^3) - 9*(B^2*b*d*n^2 - 2*B^2*b*d*n *log(e) - 2*A*B*b*d*n)*(b*x + a)^2/((b^2*c^2*g^4 - 2*a*b*c*d*g^4 + a^2*d^2 *g^4)*(d*x + c)^2) + 18*(B^2*b^2*n^2 - B^2*b^2*n*log(e) - A*B*b^2*n)*(b*x + a)/((b^2*c^2*g^4 - 2*a*b*c*d*g^4 + a^2*d^2*g^4)*(d*x + c)))*log((b*x + a )/(d*x + c)) + 2*(2*B^2*d^2*n^2 - 6*B^2*d^2*n*log(e) + 9*B^2*d^2*log(e)^2 - 6*A*B*d^2*n + 18*A*B*d^2*log(e) + 9*A^2*d^2)*(b*x + a)^3/((b^2*c^2*g^4 - 2*a*b*c*d*g^4 + a^2*d^2*g^4)*(d*x + c)^3) - 27*(B^2*b*d*n^2 - 2*B^2*b*d*n *log(e) + 2*B^2*b*d*log(e)^2 - 2*A*B*b*d*n + 4*A*B*b*d*log(e) + 2*A^2*b*d) *(b*x + a)^2/((b^2*c^2*g^4 - 2*a*b*c*d*g^4 + a^2*d^2*g^4)*(d*x + c)^2) + 5 4*(2*B^2*b^2*n^2 - 2*B^2*b^2*n*log(e) + B^2*b^2*log(e)^2 - 2*A*B*b^2*n + 2 *A*B*b^2*log(e) + A^2*b^2)*(b*x + a)/((b^2*c^2*g^4 - 2*a*b*c*d*g^4 + a^2*d ^2*g^4)*(d*x + c)))*(b*c/(b*c - a*d)^2 - a*d/(b*c - a*d)^2)
Time = 3.82 (sec) , antiderivative size = 1040, normalized size of antiderivative = 2.42 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(c g+d g x)^4} \, dx=-{\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}^2\,\left (\frac {B^2}{3\,d\,\left (c^3\,g^4+3\,c^2\,d\,g^4\,x+3\,c\,d^2\,g^4\,x^2+d^3\,g^4\,x^3\right )}+\frac {B^2\,b^3}{3\,d\,g^4\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}\right )-\frac {\frac {18\,A^2\,a^2\,d^2-36\,A^2\,a\,b\,c\,d+18\,A^2\,b^2\,c^2-12\,A\,B\,a^2\,d^2\,n+42\,A\,B\,a\,b\,c\,d\,n-66\,A\,B\,b^2\,c^2\,n+4\,B^2\,a^2\,d^2\,n^2-23\,B^2\,a\,b\,c\,d\,n^2+85\,B^2\,b^2\,c^2\,n^2}{6\,\left (a\,d-b\,c\right )}-\frac {x\,\left (-49\,c\,B^2\,b^2\,d\,n^2+5\,a\,B^2\,b\,d^2\,n^2+30\,A\,c\,B\,b^2\,d\,n-6\,A\,a\,B\,b\,d^2\,n\right )}{2\,\left (a\,d-b\,c\right )}+\frac {b\,x^2\,\left (11\,B^2\,b\,d^2\,n^2-6\,A\,B\,b\,d^2\,n\right )}{a\,d-b\,c}}{x\,\left (27\,a\,c^2\,d^3\,g^4-27\,b\,c^3\,d^2\,g^4\right )-x^2\,\left (27\,b\,c^2\,d^3\,g^4-27\,a\,c\,d^4\,g^4\right )+x^3\,\left (9\,a\,d^5\,g^4-9\,b\,c\,d^4\,g^4\right )+9\,a\,c^3\,d^2\,g^4-9\,b\,c^4\,d\,g^4}-\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\,\left (\frac {2\,A\,B}{3\,c^3\,d\,g^4+9\,c^2\,d^2\,g^4\,x+9\,c\,d^3\,g^4\,x^2+3\,d^4\,g^4\,x^3}+\frac {2\,B^2\,b^3\,\left (x\,\left (d\,\left (\frac {d\,g^4\,n\,\left (a\,d-b\,c\right )\,\left (a\,d-3\,b\,c\right )}{2\,b^2}-\frac {c\,d\,g^4\,n\,\left (a\,d-b\,c\right )}{b}\right )-\frac {2\,c\,d^2\,g^4\,n\,\left (a\,d-b\,c\right )}{b}+\frac {d^2\,g^4\,n\,\left (a\,d-b\,c\right )\,\left (a\,d-3\,b\,c\right )}{b^2}\right )+c\,\left (\frac {d\,g^4\,n\,\left (a\,d-b\,c\right )\,\left (a\,d-3\,b\,c\right )}{2\,b^2}-\frac {c\,d\,g^4\,n\,\left (a\,d-b\,c\right )}{b}\right )-\frac {d\,g^4\,n\,\left (a\,d-b\,c\right )\,\left (a^2\,d^2-3\,a\,b\,c\,d+3\,b^2\,c^2\right )}{b^3}-\frac {3\,d^3\,g^4\,n\,x^2\,\left (a\,d-b\,c\right )}{b}\right )}{3\,d\,g^4\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )\,\left (3\,c^3\,d\,g^4+9\,c^2\,d^2\,g^4\,x+9\,c\,d^3\,g^4\,x^2+3\,d^4\,g^4\,x^3\right )}\right )-\frac {B\,b^3\,n\,\mathrm {atan}\left (\frac {B\,b^3\,n\,\left (6\,A-11\,B\,n\right )\,\left (\frac {a^3\,d^4\,g^4-a^2\,b\,c\,d^3\,g^4-a\,b^2\,c^2\,d^2\,g^4+b^3\,c^3\,d\,g^4}{a^2\,d^3\,g^4-2\,a\,b\,c\,d^2\,g^4+b^2\,c^2\,d\,g^4}+2\,b\,d\,x\right )\,\left (a^2\,d^3\,g^4-2\,a\,b\,c\,d^2\,g^4+b^2\,c^2\,d\,g^4\right )\,1{}\mathrm {i}}{d\,g^4\,\left (11\,B^2\,b^3\,n^2-6\,A\,B\,b^3\,n\right )\,{\left (a\,d-b\,c\right )}^3}\right )\,\left (6\,A-11\,B\,n\right )\,2{}\mathrm {i}}{9\,d\,g^4\,{\left (a\,d-b\,c\right )}^3} \]
- log(e*((a + b*x)/(c + d*x))^n)^2*(B^2/(3*d*(c^3*g^4 + d^3*g^4*x^3 + 3*c* d^2*g^4*x^2 + 3*c^2*d*g^4*x)) + (B^2*b^3)/(3*d*g^4*(a^3*d^3 - b^3*c^3 + 3* a*b^2*c^2*d - 3*a^2*b*c*d^2))) - ((18*A^2*a^2*d^2 + 18*A^2*b^2*c^2 + 4*B^2 *a^2*d^2*n^2 + 85*B^2*b^2*c^2*n^2 - 36*A^2*a*b*c*d - 12*A*B*a^2*d^2*n - 66 *A*B*b^2*c^2*n - 23*B^2*a*b*c*d*n^2 + 42*A*B*a*b*c*d*n)/(6*(a*d - b*c)) - (x*(5*B^2*a*b*d^2*n^2 - 49*B^2*b^2*c*d*n^2 - 6*A*B*a*b*d^2*n + 30*A*B*b^2* c*d*n))/(2*(a*d - b*c)) + (b*x^2*(11*B^2*b*d^2*n^2 - 6*A*B*b*d^2*n))/(a*d - b*c))/(x*(27*a*c^2*d^3*g^4 - 27*b*c^3*d^2*g^4) - x^2*(27*b*c^2*d^3*g^4 - 27*a*c*d^4*g^4) + x^3*(9*a*d^5*g^4 - 9*b*c*d^4*g^4) + 9*a*c^3*d^2*g^4 - 9 *b*c^4*d*g^4) - log(e*((a + b*x)/(c + d*x))^n)*((2*A*B)/(3*c^3*d*g^4 + 3*d ^4*g^4*x^3 + 9*c^2*d^2*g^4*x + 9*c*d^3*g^4*x^2) + (2*B^2*b^3*(x*(d*((d*g^4 *n*(a*d - b*c)*(a*d - 3*b*c))/(2*b^2) - (c*d*g^4*n*(a*d - b*c))/b) - (2*c* d^2*g^4*n*(a*d - b*c))/b + (d^2*g^4*n*(a*d - b*c)*(a*d - 3*b*c))/b^2) + c* ((d*g^4*n*(a*d - b*c)*(a*d - 3*b*c))/(2*b^2) - (c*d*g^4*n*(a*d - b*c))/b) - (d*g^4*n*(a*d - b*c)*(a^2*d^2 + 3*b^2*c^2 - 3*a*b*c*d))/b^3 - (3*d^3*g^4 *n*x^2*(a*d - b*c))/b))/(3*d*g^4*(a^3*d^3 - b^3*c^3 + 3*a*b^2*c^2*d - 3*a^ 2*b*c*d^2)*(3*c^3*d*g^4 + 3*d^4*g^4*x^3 + 9*c^2*d^2*g^4*x + 9*c*d^3*g^4*x^ 2))) - (B*b^3*n*atan((B*b^3*n*(6*A - 11*B*n)*((a^3*d^4*g^4 + b^3*c^3*d*g^4 - a^2*b*c*d^3*g^4 - a*b^2*c^2*d^2*g^4)/(a^2*d^3*g^4 + b^2*c^2*d*g^4 - 2*a *b*c*d^2*g^4) + 2*b*d*x)*(a^2*d^3*g^4 + b^2*c^2*d*g^4 - 2*a*b*c*d^2*g^4...